!****************************************************
!
!***************************************************
#define alpha 0.0876
#define beta 0.0765
#define FREQ 1500000000
#define SIZEY 5
#define SIZEX 5
#define ITER 10
!**********************************************
!     program main 
!**********************************************
      program main
        implicit none
        integer :: i,j,itt,dest,src
        real(8),allocatable :: test(:,:,:)
        integer(8) st,et
        allocate (test(SIZEY,SIZEX,2))
        !init
        do i=1,SIZEX
        do j=1,SIZEY
          test(j,i,1) = (i*2.5 + j*3.3)*i/3.3
          test(j,i,2) = test(j,i,1)
        enddo
        enddo
        print *,"init over" 
        !call rtcc(st)
        !compute
        do  itt = 1,10
         dest=mod(itt,2)+1
         src=mod(itt+1,2)+1
         do i=2, SIZEX-1
         do j=2, SIZEY-1
           test(j,i,dest) = alpha * test(j,i,src) + beta * (test(j,i+1,src) + test(j,i-1,src)+ test(j+1,i,src)+ test(j-1,i,src))
         enddo
         enddo
        enddo   
        !call rtcc(et)
        
        print *, "compute over"
        !print *, et-st
        deallocate(test)
      end program main
